import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    children: [
      {
        path: '/userMan',
        name: 'userMan',
        component: () => import('../views/userMan.vue')
      }, {
        path: '/addArt',
        name: 'addArt',
        component: () => import('../views/addArt.vue')
      }, {
        path: '/Artlist',
        name: 'Artlist',
        component: () => import('../views/Artlist.vue')
      }, {
        path: '/imgMan',
        name: 'imgMan',
        component: () => import('../views/imgMan.vue')
      }, {
        path: '/own',
        name: 'own',
        component: () => import('../views/own.vue')
      },
      {
        path: '/artCat',
        name: 'artCat',
        component: () => import('../views/artCat.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/1',
    name: 'Login',
    component: () => import('../views/Login.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
